import java.util.ArrayDeque;
import java.util.Deque;
import java.util.LinkedList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2024-01-10
 * Time: 13:31
 */
public class Test {


    public static void main(String[] args) {
        MyLinkQueue myLinkQueue=new MyLinkQueue();
        //LinkedList,ArrayDeque不仅可以当做队列,也可以当做栈
        Deque<Integer> deque=new LinkedList<>();
        Deque<Integer> deque2=new ArrayDeque<>();
        myLinkQueue.offer(1);
        myLinkQueue.offer(2);
        myLinkQueue.offer(3);
        myLinkQueue.offer(4);
        myLinkQueue.offer(5);
        System.out.println(myLinkQueue.poll());
        System.out.println(myLinkQueue.poll());
        System.out.println(myLinkQueue.poll());
        System.out.println("=========================");
        System.out.println(myLinkQueue.peek());
        System.out.println(myLinkQueue.peek());
        System.out.println(myLinkQueue.peek());
        System.out.println("队列元素个数:"+myLinkQueue.size());

    }
}
